package com.es.designmode.factorymethod;

import java.util.UUID;

/**
 * 创建对象类
 *
 * @author Will
 */
public class Product {

    private String name;
    private String id;

    public Product(String name) {
        this.name = name;
        this.id = UUID.randomUUID().toString();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public void doSth() {
        System.out.println("id:" + id);
        System.out.println("name:" + name);
    }
}
